package com.zcoj.pojo.Dto;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author 剩xia的盛夏
 * @date 2023/02/24 16:16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("")
public class Judge  implements Serializable {

    private static final long serialVersionUID = 666L;

    @ApiModelProperty(value = "", example = "1")
    @TableId(type = IdType.AUTO)
    private Integer submitId;

    @ApiModelProperty(value = "题目id", example = "1")
    private Integer pid;

    @TableField(value = "p_name")
    private String pName;

    @ApiModelProperty(value = "用户id", example = "1")
    private Integer uid;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "提交的时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date submitTime;

    @ApiModelProperty(value = "结果码具体参考文档", example = "1")
    private Integer status;


    @ApiModelProperty(value = "是否可见")
    private Integer visit;

    @ApiModelProperty(value = "0为仅自己可见，1为全部人可见。")
    private Boolean share;

    @ApiModelProperty(value = "错误提醒（编译错误，或者vj提醒）")
    private String errorMessage;

    @ApiModelProperty(value = "运行时间(ms)", example = "1")
    private Integer time;

    @ApiModelProperty(value = "运行内存（kb）", example = "1")
    private Integer memory;

    @ApiModelProperty(value = "IO判题则不为空", example = "1")
    private Integer score;

    @ApiModelProperty(value = "代码长度", example = "1")
    private Integer length;

    @ApiModelProperty(value = "代码")
    private String code;

    @ApiModelProperty(value = "代码语言")
    private String language;

    @ApiModelProperty(value = "团队id，不为团队内提交则为 0", example = "1")
    private Integer gid;

    @ApiModelProperty(value = "比赛id，非比赛题目默认为0", example = "1")
    private Integer cid;

    @ApiModelProperty(value = "比赛中题目排序id，非比赛题目默认为0", example = "1")
    private Integer cpid;

    @ApiModelProperty(value = "训练id，非训练默认为0")
    private Integer tid;

    @ApiModelProperty(value = "判题机ip")
    private String judger;

    @ApiModelProperty(value = "提交者所在ip")
    private String ip;

    @ApiModelProperty(value = "oi排行榜得分", example = "1")
    private Integer oiRankScore;

    @ApiModelProperty(value = "是否为人工评测 0不是 1是")
    private Boolean isManual;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
